﻿using QuanLyKho.DAL;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyKho.GUI
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void btnNhapKho_Click(object sender, EventArgs e)
        {
            NhapForm nhapFrm = new NhapForm();
            nhapFrm.ShowDialog();
        }

        private void btnXuatKho_Click(object sender, EventArgs e)
        {
            XuatForm xuatFrm = new XuatForm();
            xuatFrm.ShowDialog();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            DataProvider.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Database\Kho_Database.accdb;";
            DataProvider.Connect();
        }

        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            DataProvider.Disconnect();
        }

    }
}
